package com.bootdo.wechat.constant;

/**
 * 定义异常信息
 * Created by songjw
 * 关于微信错误 直接使用微信错误code,方便查询
 */
public enum BusinessError {

    SAVE_FAILED(4001,"保存失败"),
    UPDATE_FAILED(4002,"更新失败"),
    DELETE_FAILED(4003,"删除失败"),
    PARAM_ILLEGAL(4004,"请求参数非法，请核实!"),
    REQUEST_ILLEGAL(4005,"非法请求，可能属于伪造的请求！"),
    KFMESSAGE_SEND_FILED(45015,"发送失败：该粉丝48小时为与公众号互动"),
    MENU_ONE_FAILED(4006,"保存失败，一级菜单最多创建三个"),
    MENU_TWO_FAILED(4006,"保存失败，二级菜单最多创建七个"),
    UNKNOWN(-1, "UNKNOWN");

    BusinessError(int code, String message) {
        this.code = code;
        this.message = message;
    }

    private int code;
    private String message;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
